/[smecontribs]/rpms/smeserver-nextcloud/contribs10/smeserver-nextcloud-1.2.0-bz12096-bz12095.patch
ViewVC logotype

Annotation of /rpms/smeserver-nextcloud/contribs10/smeserver-nextcloud-1.2.0-bz12096-bz12095.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.3 - (hide annotations) (download)
Fri Jul 8 18:24:00 2022 UTC (2 years, 3 months ago) by jpp
Branch: MAIN
CVS Tags: smeserver-nextcloud-1_2_0-29_el7_sme, smeserver-nextcloud-1_2_0-22_el7_sme, smeserver-nextcloud-1_2_0-19_el7_sme, smeserver-nextcloud-1_2_0-26_el7_sme, smeserver-nextcloud-1_2_0-27_el7_sme, smeserver-nextcloud-1_2_0-31_el7_sme, smeserver-nextcloud-1_2_0-24_el7_sme, smeserver-nextcloud-1_2_0-30_el7_sme, smeserver-nextcloud-1_2_0-17_el7_sme, smeserver-nextcloud-1_2_0-25_el7_sme, smeserver-nextcloud-1_2_0-20_el7_sme, smeserver-nextcloud-1_2_0-23_el7_sme, smeserver-nextcloud-1_2_0-21_el7_sme, smeserver-nextcloud-1_2_0-18_el7_sme, smeserver-nextcloud-1_2_0-28_el7_sme, HEAD
Changes since 1.2: +77 -4 lines
* Fri Jul 08 2022 Jean-Philippe Pialasse <tests@pialasse.com> 1.2.0-17.sme
- fix gencache again [SME: 12096]
- fix ldap users/groups not availables on first run [SME: 12095]

1 jpp 1.1 diff -Nur --no-dereference smeserver-nextcloud-1.2.0.old/root/etc/e-smith/events/actions/nextcloud-conf smeserver-nextcloud-1.2.0/root/etc/e-smith/events/actions/nextcloud-conf
2     --- smeserver-nextcloud-1.2.0.old/root/etc/e-smith/events/actions/nextcloud-conf 2022-07-08 12:03:27.238000000 -0400
3 jpp 1.3 +++ smeserver-nextcloud-1.2.0/root/etc/e-smith/events/actions/nextcloud-conf 2022-07-08 13:47:56.662000000 -0400
4     @@ -52,7 +52,12 @@
5     OCC "ldap:create-empty-config" # create config with empty id
6     OCC "ldap:create-empty-config" # create config with id s01
7     OCC "ldap:delete-config ''" # delte config with empty id
8     + mkdir -p /home/e-smith/files/nextcloud/skeleton/ibays
9     + /usr/bin/occ config:system:set skeletondirectory --value="/home/e-smith/files/nextcloud/skeleton"
10     + #/usr/bin/occ config:system:set templatedirectory --value=""
11     else
12     + mkdir -p /home/e-smith/files/nextcloud/skeleton/ibays
13     + /usr/bin/occ config:system:set skeletondirectory --value="/home/e-smith/files/nextcloud/skeleton"
14     # to satisfy code integrity check
15     if [ -f /usr/share/nextcloud/.htaccess.rpmsave ]; then
16     rm -f /usr/share/nextcloud/.htaccess.rpmsave
17     @@ -75,4 +80,9 @@
18 jpp 1.1 mkdir -p /var/www/.cache/samba
19     chown www:shared /var/www/.cache/samba
20     fi
21     +if [ ! -d /home/e-smith/.cache/samba ]; then
22     + mkdir -p /home/e-smith/.cache/samba
23     + chown www:admin /home/e-smith/.cache/samba
24     +fi
25     +
26    
27     diff -Nur --no-dereference smeserver-nextcloud-1.2.0.old/root/etc/e-smith/events/actions/nextcloud-occ-conf smeserver-nextcloud-1.2.0/root/etc/e-smith/events/actions/nextcloud-occ-conf
28     --- smeserver-nextcloud-1.2.0.old/root/etc/e-smith/events/actions/nextcloud-occ-conf 2022-07-08 12:03:27.223000000 -0400
29 jpp 1.3 +++ smeserver-nextcloud-1.2.0/root/etc/e-smith/events/actions/nextcloud-occ-conf 2022-07-08 14:12:02.289000000 -0400
30     @@ -148,11 +148,16 @@
31 jpp 1.1 OCC "ldap:set-config s01 ldapExpertUUIDGroupAttr cn";
32     OCC "ldap:set-config s01 ldapExpertUUIDUserAttr uid";
33     OCC "ldap:set-config s01 ldapExpertUsernameAttr uid";
34     + # test new config to make it available, and sync user/groups
35     + OCC "ldap:test-config s01";
36 jpp 1.2 + %NCusers= listUsers;
37 jpp 1.3 + my $totrash = OCCr "group:list";
38 jpp 1.1
39     # set ibays shares
40     foreach ( @ibays) {
41 jpp 1.3 my $group = $_->prop('Group') ||'';
42     my $key = $_->key;
43     + print "Configuring file repo : $key\n";
44     my $id = "";
45     my $typ = $_->prop('type');
46     my @wgroups = split(',', $_->prop('WriteGroups')||'');
47     @@ -183,9 +188,11 @@
48     $id = OCCr "files_external:create -c datadir=/home/e-smith/files/$typ/$key 'ibays/$key' local null::null --output json";
49     }
50     for $group (@groups) {
51     + print " adding group $group to file repo $id\n";
52     OCC "files_external:applicable --add-group $group $id --output json";
53     }
54     for my $u (@uUsers) {
55     + print " adding user $u to file repo $id\n";
56     OCC "files_external:applicable --add-user $u $id --output json" ;
57     }
58     push @idOK,$id;
59     @@ -240,6 +247,7 @@
60     my $key = $_->key;
61     my $id = "";
62     my $user = $NCusers{$key};
63     + print "Configuring user $user ($key)\n";
64     # in case user not already know by NC, skip
65     # normally not necessary, thanks to LDAP!!
66     next if ($user eq "");
67     @@ -249,6 +257,7 @@
68     unless ( !-d $idir || !-d "$idir/files" || -d "$idir/files/ibays")
69     {
70     mkdir "$idir/files/ibays", 0770;
71     + print " created $idir/files/ibays\n";
72     }
73     # we do this on every turn in case it was wrong
74     chown $uid, $gid,"$idir/files/ibays";
75     @@ -269,13 +278,13 @@
76     $id = OCCr "files_external:create -c share=$key -c host=localhost -c domain=$workgroup -c root='' -c show_hidden=false -c check_acl=false -c timeout='' '$key' smb password::logincredentials --output json";
77     OCC "files_external:applicable --add-user $user $id";
78     push @idOK,$id;
79     - print "created home dir for $key $user\n";
80     + print " created home dir for $key $user\n";
81     next;
82     }
83    
84     if (scalar(@matching_keys) > 1) {
85     #if more than 1 delete all but older
86     - print "more than one $key, deleting the latest, keeping first\n";
87     + print " more than one $key, deleting the latest, keeping first\n";
88     while (scalar(@matching_keys) > 1){
89     my $bad = pop @matching_keys;
90     OCC "files_external:delete $bad -y";
91     @@ -283,7 +292,7 @@
92     }
93     $id = pop @matching_keys;
94     if (scalar(@{$localmounts{$id}{'applicable_groups'}}) >0 || scalar(@{$localmounts{$id}{'applicable_users'}}) >1 || scalar(@{$localmounts{$id}{'applicable_users'}}) == 0 || $localmounts{$id}{'applicable_users'}[0] ne $user) {
95     - print "updating $key\n";
96     + print " updating $key\n";
97     OCC "files_external:applicable --remove-all $id";
98     OCC "files_external:applicable --add-user $user $id" ;
99     }

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed