Accepting request 537045 from home:RBrownSUSE:branches:Base:System

Forgot to actually change the macro in 536895

OBS-URL: https://build.opensuse.org/request/show/537045
OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=406
This commit is contained in:
Richard Brown 2017-10-27 14:36:12 +00:00 committed by Git OBS Bridge
parent c7cda24f07
commit c3b54b9f96
3 changed files with 27 additions and 18 deletions

View File

@ -1,8 +1,16 @@
-------------------------------------------------------------------
Thu Oct 26 12:10:16 UTC 2017 - rbrown@suse.com
- Remove usr-lib-rpmdb.patch
- Add usr-lib-sysimage-rpm.patch to locate rpmdb to
/usr/lib/sysimage/rpm after discussions with upstream
- Migrates existing rpmdb in /var/lib/rpm to /usr/lib/sysimage/rpm
-------------------------------------------------------------------
Thu Oct 5 13:28:53 UTC 2017 - rbrown@suse.com
- Add usr-lib-rpmdb.patch to locate rpmdb to /usr/lib/rpmdb
- Migrates existing rpmdb in /var/lib/rpm to /usr/lib/rpmdb
- Migrates existing rpmdb in /var/lib/rpm to /usr/lib/rpmdb
-------------------------------------------------------------------
Fri Sep 8 15:37:36 UTC 2017 - mmarek@suse.com

View File

@ -63,7 +63,7 @@ Patch1: beecrypt-4.1.2.diff
Patch2: db.diff
Patch3: rpm-4.12.0.1-fix-bashisms.patch
Patch4: beecrypt-4.1.2-build.diff
Patch5: usr-lib-rpmdb.patch
Patch5: usr-lib-sysimage-rpm.patch
# quilt patches start here
Patch11: debugedit.diff
Patch13: ignore-auxv.diff
@ -328,7 +328,7 @@ for d in %{buildroot}/usr/lib/rpm/platform/*-linux/macros ; do
mkdir %{buildroot}/usr/src/packages/RPMS/$dd
chmod 755 %{buildroot}/usr/src/packages/RPMS/$dd
done
mkdir -p %{buildroot}/usr/lib/rpmdb
mkdir -p %{buildroot}/usr/lib/sysimage/rpm
mkdir -p %{buildroot}/var/lib/rpm
gzip -9 %{buildroot}/%{_mandir}/man[18]/*.[18]
export RPM_BUILD_ROOT
@ -384,13 +384,13 @@ echo -n "%{_target_cpu}-suse-linux-gnueabi" > %{buildroot}/etc/rpm/platform
%post
%{fillup_only -an services}
# var/lib/rpm migration: set forwards compatible symlink for /usr/lib/rpmdb so scriptlets in same transaction will still work
# var/lib/rpm migration: set forwards compatible symlink for /usr/lib/sysimage/rpm so scriptlets in same transaction will still work
if (test ! -L var/lib/rpm) && (test -f var/lib/rpm/Packages) ; then
rmdir usr/lib/rpmdb
ln -s ../../var/lib/rpm usr/lib/rpmdb
rmdir usr/lib/sysimage/rpm
ln -s ../../var/lib/rpm usr/lib/sysimage/rpm
fi
test -f usr/lib/rpmdb/Packages || rpmdb --initdb
test -f usr/lib/sysimage/rpm/Packages || rpmdb --initdb
%posttrans
# var/lib/rpm migration
@ -402,21 +402,21 @@ if test ! -L var/lib/rpm ; then
rm -f var/lib/rpm/conflictsindex.rpm var/lib/rpm/fileindex.rpm var/lib/rpm/groupindex.rpm var/lib/rpm/nameindex.rpm var/lib/rpm/providesindex.rpm var/lib/rpm/requiredby.rpm var/lib/rpm/triggerindex.rpm
fi
# delete no longer maintained databases
rm -f var/lib/rpm/Filemd5s var/lib/rpm/Filedigests var/lib/rpm/Requireversion var/lib/rpmdb/Provideversion
rm -f var/lib/rpm/Filemd5s var/lib/rpm/Filedigests var/lib/rpm/Requireversion var/lib/rpm/Provideversion
if test -f var/lib/rpm/Packages ; then
echo "migrating rpmdb from /var/lib/rpm to /usr/lib/rpmdb..."
echo "migrating rpmdb from /var/lib/rpm to /usr/lib/sysimage/rpm..."
# remove forwards compatible symlink
if test -L usr/lib/rpmdb ; then
rm -f usr/lib/rpmdb
mkdir -p usr/lib/rpmdb
if test -L usr/lib/sysimage/rpm ; then
rm -f usr/lib/sysimage/rpm
mkdir -p usr/lib/sysimage/rpm
fi
mv -f var/lib/rpm/.[!.]* usr/lib/rpmdb/
mv -f var/lib/rpm/* usr/lib/rpmdb/
mv -f var/lib/rpm/.[!.]* usr/lib/sysimage/rpm/
mv -f var/lib/rpm/* usr/lib/sysimage/rpm/
fi
rmdir var/lib/rpm && ln -s ../../usr/lib/rpmdb var/lib/rpm
rmdir var/lib/rpm && ln -s ../../usr/lib/sysimage/rpm var/lib/rpm
fi
%files -f rpm.lang
@ -437,8 +437,9 @@ fi
%{_libdir}/librpmio.so.*
%{_libdir}/librpmsign.so.*
%doc %{_mandir}/man[18]/*.[18]*
%dir /usr/lib/rpmdb
%dir /var/lib/rpm
%dir /usr/lib/sysimage
%dir /usr/lib/sysimage/rpm
%dir /var/lib/rpm
%dir %attr(755,root,root) /usr/src/packages/BUILD
%dir %attr(755,root,root) /usr/src/packages/SPECS
%dir %attr(755,root,root) /usr/src/packages/SOURCES

View File

@ -5,7 +5,7 @@
# The location of the rpm database file(s).
-%_dbpath %{_var}/lib/rpm
+%_dbpath %{_usr}/lib/rpmdb
+%_dbpath %{_usr}/lib/sysimage/rpm
# The location of the rpm database file(s) after "rpm --rebuilddb".
%_dbpath_rebuild %{_dbpath}