update to new snapshot, add patch to remove user

This commit is contained in:
tpg (Tomasz Paweł Gajc) 2015-02-23 19:02:31 +01:00
parent debf392e76
commit 524084075e
5 changed files with 49 additions and 16 deletions

View file

@ -1,3 +1,3 @@
sources:
calamares-1.0.0-20150222.tar.xz: 5a8a5da9b80d93a26c02bac6e8cfc7726a4516a4
calamares-1.0.0-20150223.tar.xz: c317b28015214905bdb3e3ea1377aad9e2317e38
calamares-partitionmanager-20150112.tar.xz: 9fd2828fde3ecb3692868ea186469424c5be580e

View file

@ -0,0 +1,44 @@
diff -Naur calamares-1.0.0-20150223/src/modules/users/CreateUserJob.cpp calamares-1.0.0-20150223.tpg/src/modules/users/CreateUserJob.cpp
--- calamares-1.0.0-20150223/src/modules/users/CreateUserJob.cpp 2015-02-23 08:45:48.000000000 +0000
+++ calamares-1.0.0-20150223.tpg/src/modules/users/CreateUserJob.cpp 2015-02-23 18:01:08.983649397 +0000
@@ -143,5 +143,14 @@
tr( "chown terminated with error code %1." )
.arg( ec ) );
+ if ( gs->contains( "removeUser" ) &&
+ !gs->value( "removeUser" ).toString().isEmpty() )
+ {
+
+ QString removeUser = gs->value( "removeUser" ).toString();
+
+ CalamaresUtils::chrootCall( { "userdel", "-f", "-r" removeUser } );
+ }
+
return Calamares::JobResult::ok();
}
diff -Naur calamares-1.0.0-20150223/src/modules/users/UsersViewStep.cpp calamares-1.0.0-20150223.tpg/src/modules/users/UsersViewStep.cpp
--- calamares-1.0.0-20150223/src/modules/users/UsersViewStep.cpp 2015-02-23 08:45:48.000000000 +0000
+++ calamares-1.0.0-20150223.tpg/src/modules/users/UsersViewStep.cpp 2015-02-23 17:58:40.420748643 +0000
@@ -151,5 +151,13 @@
Calamares::JobQueue::instance()->globalStorage()->insert( "sudoersGroup",
configurationMap.value( "sudoersGroup" ).toString() );
}
+
+ if ( configurationMap.contains( "removeUser" ) &&
+ configurationMap.value( "removeUser" ).type() == QVariant::String )
+ {
+ Calamares::JobQueue::instance()->globalStorage()->insert( "removeUser",
+ configurationMap.value( "removeUser" ).toString() );
+ }
+
}
diff -Naur calamares-1.0.0-20150223/src/modules/users/users.conf calamares-1.0.0-20150223.tpg/src/modules/users/users.conf
--- calamares-1.0.0-20150223/src/modules/users/users.conf 2015-02-23 08:45:48.000000000 +0000
+++ calamares-1.0.0-20150223.tpg/src/modules/users/users.conf 2015-02-23 17:32:11.521059300 +0000
@@ -9,3 +9,5 @@
- audio
autologinGroup: autologin
sudoersGroup: wheel
+# Remove specified user after installation is done
+removeUser:

View file

@ -1,12 +0,0 @@
diff -Naur calamares-1.0.0-20150203/src/modules/packages/main.py calamares-1.0.0-20150203.tpg/src/modules/packages/main.py
--- calamares-1.0.0-20150203/src/modules/packages/main.py 2015-02-03 08:45:42.000000000 +0000
+++ calamares-1.0.0-20150203.tpg/src/modules/packages/main.py 2015-02-22 00:35:34.360391343 +0000
@@ -53,7 +53,7 @@
# ignore the error code for now because dnf thinks removing a nonexistent package is an error
chroot_call(["dnf", "--disablerepo=*", "-C", "-y", "remove"] + pkgs)
elif self.backend == "urpmi":
- check_chroot_call(["urpme"] + pkgs)
+ check_chroot_call(["urpme", "--auto"] + pkgs)
elif self.backend == "apt":
check_chroot_call(["apt-get", "--purge", "-q", "-y", "remove"] + pkgs)
check_chroot_call(["apt-get", "--purge", "-q", "-y", "autoremove"])

View file

@ -1,4 +1,4 @@
%define calamdate 20150222
%define calamdate 20150223
%define partdate 20150112
%define major 1
@ -8,7 +8,7 @@
Summary: Distribution-independent installer framework
Name: calamares
Version: 1.0.0
Release: 0.%{calamdate}.3
Release: 0.%{calamdate}.1
Group: System/Configuration/Other
License: GPLv3+
URL: http://calamares.io/
@ -35,7 +35,7 @@ Source18: omv-settings.conf
Source19: omv-unpackfs.conf
Source20: omv-users.conf
Patch1: calamares-0.17.0-20150112-openmandriva-desktop-file.patch
Patch2: calamares-1.0.0-20150203-use-urpme--auto.patch
Patch3: calamares-1.0.0-20150203-add-removeUser-functionality.patch
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5DBus)
BuildRequires: pkgconfig(Qt5Xml)

View file

@ -10,3 +10,4 @@ defaultGroups:
- sambashare
autologinGroup: autologin
sudoersGroup: wheel
removeUser: live