Compare commits
	
		
			7 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | e08d687061 | ||
|   | 15f6369537 | ||
|   | f01b4ed2f8 | ||
|   | ea762b0945 | ||
|   | cae8acb4a4 | ||
|   | ae204d0108 | ||
|   | a2fae600c4 | 
							
								
								
									
										18
									
								
								CHANGES
									
									
									
									
									
								
							
							
						
						
									
										18
									
								
								CHANGES
									
									
									
									
									
								
							| @@ -6,6 +6,24 @@ This is the changelog for Calamares-Extensions. For each release, the major | ||||
| changes and contributors are listed. Note that Calamares-Extensions does not | ||||
| have a historical changelog -- this log starts with version 1.0.0. | ||||
|  | ||||
| # 1.3.2 (2023-08-28) | ||||
|  | ||||
| We skipped a couple of releases in the release-notes, then tagged | ||||
| 1.3.1 without a version bump or release-notes. So 1.3.2 brings us | ||||
| back to "regular releases". | ||||
|  | ||||
| This release contains contributions from (alphabetically by first name): | ||||
|  - Anke Boersma | ||||
|  - Nathan Schulte | ||||
|  - Oliver Smith | ||||
|  - stravanpannala | ||||
|  - undef | ||||
|  | ||||
| Changes and new modules in this release: | ||||
|  - *mobile* Has new configuration options. (Thanks Nathan, Oliver) | ||||
|  - *unpackfsc* Uses a more portable invocation of tar. (Thanks sravanpannala) | ||||
|  | ||||
|  | ||||
| # 1.2.1 (2021-11-16) | ||||
|  | ||||
| The 1.2.0 release had no release-notes for that version, and failed to | ||||
|   | ||||
| @@ -40,7 +40,7 @@ | ||||
| # | ||||
| cmake_minimum_required(VERSION 3.3 FATAL_ERROR) | ||||
|  | ||||
| set( CALAMARES_EXTENSIONS_VERSION 1.2.1 ) | ||||
| set( CALAMARES_EXTENSIONS_VERSION 1.3.2 ) | ||||
|  | ||||
| include( ${CMAKE_CURRENT_LIST_DIR}/CMakeModules/ExtendedVersion.cmake ) | ||||
| if ( CMAKE_SCRIPT_MODE_FILE ) | ||||
|   | ||||
| @@ -29,15 +29,12 @@ rules of decent behavior in both communities are pretty much the same). | ||||
|  | ||||
| GitHub Issues are **one** place for discussing Calamares and its extensions if there are concrete | ||||
| problems or a new feature to discuss. | ||||
| Issues are not a help channel. | ||||
| Visit Matrix for help with configuration or compilation. | ||||
|  | ||||
| Regular Calamares development chit-chat happens in a [Matrix](https://matrix.org/) | ||||
| room, `#calamares:kde.org`. The conversation is bridged with IRC | ||||
| on [Libera.Chat](https://libera.chat/). | ||||
| Responsiveness is best during the day | ||||
| in Europe, but feel free to idle. If you use IRC, **DO NOT** ask-and-leave. Keep | ||||
| that chat window open because it can easily take a few hours for | ||||
| someone to notice a message. | ||||
| room, `#calamares:kde.org`. Responsiveness is best during the day | ||||
| in Europe, but feel free to idle. | ||||
| Matrix is persistent, and we'll see your message eventually. | ||||
|  | ||||
| * [](https://webchat.kde.org/#/room/%23calamares:kde.org) | ||||
| * [](https://kiwiirc.com/client/irc.libera.chat/#calamares) | ||||
|   | ||||
							
								
								
									
										11
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								README.md
									
									
									
									
									
								
							| @@ -220,15 +220,12 @@ The API is loosely documented in the | ||||
| GitHub Issues are **one** place for discussing Calamares (and Calamares Extensions) | ||||
| if there are concrete | ||||
| problems or a new feature to discuss. | ||||
| Issues are not a help channel. | ||||
| Visit Matrix for help with configuration or compilation. | ||||
|  | ||||
| Regular Calamares development chit-chat happens in a [Matrix](https://matrix.org/) | ||||
| room, `#calamares:kde.org`. The conversation is bridged with IRC | ||||
| on [Libera.Chat](https://libera.chat/). | ||||
| Responsiveness is best during the day | ||||
| in Europe, but feel free to idle. If you use IRC, **DO NOT** ask-and-leave. Keep | ||||
| that chat window open because it can easily take a few hours for | ||||
| someone to notice a message. | ||||
| room, `#calamares:kde.org`. Responsiveness is best during the day | ||||
| in Europe, but feel free to idle. | ||||
| Matrix is persistent, and we'll see your message eventually. | ||||
|  | ||||
| * [](https://webchat.kde.org/#/room/%23calamares:kde.org) | ||||
| * [](https://kiwiirc.com/client/irc.libera.chat/#calamares) | ||||
|   | ||||
| @@ -148,7 +148,7 @@ test -n "$V" || { echo "Could not obtain version in $BUILDDIR ." ; exit 1 ; } | ||||
| # This is the signing key ID associated with the GitHub account adriaandegroot, | ||||
| # which is used to create all "verified" tags in the Calamares repo. | ||||
| # | ||||
| KEY_ID="CFDDC96F12B1915C" | ||||
| KEY_ID="328D742D8807A435" | ||||
| git tag -u "$KEY_ID" -m "Release v$V" "v$V" || { echo "Could not sign tag v$V." ; exit 1 ; } | ||||
|  | ||||
| ### Create the tarball | ||||
|   | ||||
| @@ -36,6 +36,7 @@ Config::setConfigurationMap( const QVariantMap& cfgMap ) | ||||
|             "messagebus", "news", "nobody", "ntp", "operator", "polkitd", "postmaster", "pulse", "root", "shutdown", | ||||
|             "smmsp", "squid", "sshd", "sync", "uucp", "vpopmail", "xfs" } ); | ||||
|  | ||||
|     // ensure m_cmdUsermod matches m_username | ||||
|     m_username = getString( cfgMap, "username", "user" ); | ||||
|     m_userPasswordNumeric = getBool( cfgMap, "userPasswordNumeric", true ); | ||||
|  | ||||
| @@ -60,6 +61,8 @@ Config::setConfigurationMap( const QVariantMap& cfgMap ) | ||||
|  | ||||
|     m_cmdInternalStoragePrepare = getString( cfgMap, "cmdInternalStoragePrepare", "ondev-internal-storage-prepare" ); | ||||
|     m_cmdPasswd = getString( cfgMap, "cmdPasswd", "passwd" ); | ||||
|     m_cmdUsermod = getString( cfgMap, "cmdUsermod", "xargs -I{} -n1 usermod -m -d /home/{} -l {} -c {} user"); | ||||
|  | ||||
|     m_cmdSshdEnable = getString( cfgMap, "cmdSshdEnable", "systemctl enable sshd.service" ); | ||||
|     m_cmdSshdDisable = getString( cfgMap, "cmdSshdDisable", "systemctl disable sshd.service" ); | ||||
|     m_cmdSshdUseradd = getString( cfgMap, "cmdSshdUseradd", "useradd -G wheel -m" ); | ||||
| @@ -74,6 +77,7 @@ Config::createJobs() | ||||
|     /* Put users job in queue (should run after unpackfs) */ | ||||
|     Calamares::Job* j = new UsersJob( m_featureSshd, | ||||
|                                       m_cmdPasswd, | ||||
|                                       m_cmdUsermod, | ||||
|                                       cmdSshd, | ||||
|                                       m_cmdSshdUseradd, | ||||
|                                       m_isSshEnabled, | ||||
| @@ -138,6 +142,13 @@ Config::runPartitionJobThenLeave( bool b ) | ||||
|     } | ||||
| } | ||||
|  | ||||
| void | ||||
| Config::setUsername( const QString& username ) | ||||
| { | ||||
|     m_username = username; | ||||
|     emit usernameChanged( m_username ); | ||||
| } | ||||
|  | ||||
| void | ||||
| Config::setUserPassword( const QString& userPassword ) | ||||
| { | ||||
|   | ||||
| @@ -24,7 +24,7 @@ class Config : public QObject | ||||
|     Q_PROPERTY( QStringList reservedUsernames READ reservedUsernames CONSTANT FINAL ) | ||||
|  | ||||
|     /* default user */ | ||||
|     Q_PROPERTY( QString username READ username CONSTANT FINAL ) | ||||
|     Q_PROPERTY( QString username READ username WRITE setUsername NOTIFY usernameChanged ) | ||||
|     Q_PROPERTY( QString userPassword READ userPassword WRITE setUserPassword NOTIFY userPasswordChanged ) | ||||
|     Q_PROPERTY( bool userPasswordNumeric READ userPasswordNumeric CONSTANT FINAL ) | ||||
|  | ||||
| @@ -78,9 +78,10 @@ public: | ||||
|     /* reserved usernames (user_pass, ssh_credentials) */ | ||||
|     QStringList reservedUsernames() const { return m_reservedUsernames; }; | ||||
|  | ||||
|     /* default user */ | ||||
|     /* user */ | ||||
|     QString username() const { return m_username; } | ||||
|     QString userPassword() const { return m_userPassword; } | ||||
|     void setUsername( const QString& username ); | ||||
|     void setUserPassword( const QString& userPassword ); | ||||
|     bool userPasswordNumeric() const { return m_userPasswordNumeric; } | ||||
|  | ||||
| @@ -126,6 +127,7 @@ public: | ||||
|  | ||||
|     /* users job */ | ||||
|     QString cmdPasswd() const { return m_cmdPasswd; } | ||||
|     QString cmdUsermod() const { return m_cmdUsermod; } | ||||
|     QString cmdSshdEnable() const { return m_cmdSshdEnable; } | ||||
|     QString cmdSshdDisable() const { return m_cmdSshdDisable; } | ||||
|     QString cmdSshdUseradd() const { return m_cmdSshdUseradd; } | ||||
| @@ -181,6 +183,7 @@ private: | ||||
|  | ||||
|     /* users job */ | ||||
|     QString m_cmdPasswd; | ||||
|     QString m_cmdUsermod; | ||||
|     QString m_cmdSshdEnable; | ||||
|     QString m_cmdSshdDisable; | ||||
|     QString m_cmdSshdUseradd; | ||||
| @@ -190,6 +193,7 @@ signals: | ||||
|  | ||||
|     /* default user */ | ||||
|     void userPasswordChanged( QString userPassword ); | ||||
|     void usernameChanged( QString username ); | ||||
|  | ||||
|     /* ssh server + credentials */ | ||||
|     void sshdUsernameChanged( QString sshdUsername ); | ||||
|   | ||||
| @@ -14,6 +14,7 @@ | ||||
|  | ||||
| UsersJob::UsersJob( bool featureSshd, | ||||
|                     const QString& cmdPasswd, | ||||
|                     const QString& cmdUsermod, | ||||
|                     const QString& cmdSshd, | ||||
|                     const QString& cmdSshdUseradd, | ||||
|                     bool isSshEnabled, | ||||
| @@ -24,6 +25,7 @@ UsersJob::UsersJob( bool featureSshd, | ||||
|     : Calamares::Job() | ||||
|     , m_featureSshd( featureSshd ) | ||||
|     , m_cmdPasswd( cmdPasswd ) | ||||
|     , m_cmdUsermod( cmdUsermod ) | ||||
|     , m_cmdSshd( cmdSshd ) | ||||
|     , m_cmdSshdUseradd( cmdSshdUseradd ) | ||||
|     , m_isSshEnabled( isSshEnabled ) | ||||
| @@ -49,9 +51,11 @@ UsersJob::exec() | ||||
|     using namespace std; | ||||
|  | ||||
|     QList< QPair< QStringList, QString > > commands = { | ||||
|         { { "sh", "-c", m_cmdPasswd + " " + m_username }, m_password + "\n" + m_password + "\n" }, | ||||
|         { { "sh", "-c", m_cmdUsermod }, m_username + "\n" } | ||||
|     }; | ||||
|  | ||||
|     commands.append( { { "sh", "-c", m_cmdPasswd + " " + m_username }, m_password + "\n" + m_password + "\n" } ); | ||||
|  | ||||
|     if ( m_featureSshd ) | ||||
|     { | ||||
|         commands.append( { { "sh", "-c", m_cmdSshd }, QString() } ); | ||||
|   | ||||
| @@ -10,6 +10,7 @@ class UsersJob : public Calamares::Job | ||||
| public: | ||||
|     UsersJob( bool featureSshd, | ||||
|               const QString& cmdPasswd, | ||||
|               const QString& cmdUsermod, | ||||
|               const QString& cmdSshd, | ||||
|               const QString& cmdSshdUseradd, | ||||
|               bool isSshEnabled, | ||||
| @@ -26,6 +27,7 @@ public: | ||||
| private: | ||||
|     bool m_featureSshd; | ||||
|     QString m_cmdPasswd; | ||||
|     QString m_cmdUsermod; | ||||
|     QString m_cmdSshd; | ||||
|     QString m_cmdSshdUseradd; | ||||
|     bool m_isSshEnabled; | ||||
|   | ||||
| @@ -26,6 +26,7 @@ bogus: true | ||||
| # version: "(unknown)" | ||||
|  | ||||
| ## Default username (for which the password will be set) | ||||
| ## Ensure also cmdUsermod command matches the default user, so it can be changed if desired. | ||||
| # username: "user" | ||||
|  | ||||
| ## reserved usernames (for user_pass username prompt and ssh_credentials) | ||||
| @@ -154,6 +155,10 @@ bogus: true | ||||
| ### Commands running in the target OS (chroot) | ||||
| ####### | ||||
|  | ||||
| ## Change the username for the default user | ||||
| ## Stdin: username with \n | ||||
| # cmdUsermod: "xargs -I{} -n1 usermod -m -d /home/{} -l {} -c {} user" | ||||
|  | ||||
| ## Set the password for default user and sshd user | ||||
| ## Arguments: <username> | ||||
| ## Stdin: password twice, each time with \n | ||||
|   | ||||
| @@ -7,7 +7,7 @@ | ||||
|   <file>install_target.qml</file> <!-- install from external to internal? --> | ||||
|   <file>install_target_confirm.qml</file> <!-- overwrite internal storage? --> | ||||
|  | ||||
|   <file>user_pass.qml</file> <!-- default user: password --> | ||||
|   <file>user_pass.qml</file> <!-- default user: username, password --> | ||||
|   <file>ssh_confirm.qml</file> <!-- sshd: enable or not? --> | ||||
|   <file>ssh_credentials.qml</file> <!-- sshd user: username, password --> | ||||
|   <file>fs_selection.qml</file> <!-- filesystem selection --> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user