perfsonar-dev - Re: [gn3-sa2-t3] Transition to new naming policy
Subject: perfsonar development work
List archive
- From: Błażej Pietrzak <>
- To: Jochen Reinwand <>, ,
- Subject: Re: [gn3-sa2-t3] Transition to new naming policy
- Date: Mon, 06 Jul 2009 14:32:49 +0200
Jochen Reinwand pisze:
Hi all,
there must be something similar in RPM. At least my openSUSE system has already informed me from time to time that one package will replace another one. But I have no idea how it is done. Perhaps not directly by RPM, but by zypper that is the openSUSE counterpart of yum.
cheers,
Jochen
On Friday 03 July 2009, Błażej Pietrzak wrote:
Hello all,
Since the official package naming policy has changed the old packages
have to change their names.
The problem lies with package upgrading. If the name of the package
changes the package management software does not remove the previous
package.
In order to solve the problem for DEB packages one has to add two
properties in the control file describing the package: "Conflicts" and
"Replaces", both with the previous name of the package. So for example
for "perfsonar-java-sshtelnet-mp" package one has to add:
Conflicts: ps-mdm-sshtelnet-mp
Replaces: ps-mdm-sshtelnet-mp
This will inform the package manager that it should remove the
"ps-mdm-sshtelnet-mp" package from the system and then install
"perfsonar-java-sshtelnet-mp" package.
If one would introduce only "Replaces" property then it will tell the
package manager that the "perfsonar-java-sshtelnet-mp" package can
override files of the "ps-mdm-sshtelnet-mp" package, so that is why one
also has to add "Conflicts" property.
Unfortunately there is no such mechanism for the RPM packages. In case
of RPM packages one has to create a dummy package with the previous name
that has dependency for the package with new name.
Best regards
Blazej
Hi all,
You are right :)
I was using the information about packages from the book available on the Redhat site and it is a little bit outdated as it turned out. After reading about packaging from Fedora project I found the properties that will solve the problem (checked on the Centos 5.1 and Ubuntu 8).
In order to rename the DEB package one has to add two properties in the control file: "Conflicts" and "Replaces", both with the previous name of the package. So for example for "perfsonar-java-sshtelnet-mp" packages one has to add in the control file the following lines:
Conflicts: ps-mdm-sshtelnet-mp
Replaces: ps-mdm-sshtelnet-mp
This will inform the package manager that it should remove the "ps-mdm-sshtelnet-mp" package from the system and then install "perfsonar-java-sshtelnet-mp" package. If one would introduce only "Replaces" property then it will tell the package manager that the "perfsonar-java-sshtelnet-mp" package can override files of the "ps-mdm-sshtelnet-mp" package, so that is why one also has to add "Conflicts" property.
In case of installing a renamed package it is sufficient (apt-get install <new-package>), but when one is upgrading there has to be also a dummy package created. A dummy package is a package with a package's previous name that does not contain any files, but depends on the package with a new name, so that it could be installed when upgrading. Since the new package contains "Conflicts" and "Replaces" properties, the dummy package will be removed when installing the renamed package. When using APT one can use only "apt dist-upgrade" instead of "apt upgrade", since the latter one only upgrades and not installs/removes packages.
I have attached the control files for the dummy and for the "perfsonar-java-sshtelnet-mp" package, so that you could use it for your packages, after some modifications of course ;)
For the RPM packages it's similar, but one property name differs from that in DEB packages. In order to rename a RPM package one has to add the properties: "Conflicts" and "Obsoletes" to the specs file with a previous package name. When upgrading (i.e. rpm -U) the package manager will automatically remove the previous package and install the renamed one. I have attached the specs files for dummy and the package to the e-mail as well.
Best regards
Blazej
Attachment:
deb.zip
Description: Zip compressed data
# This is where all tomcat stuff will be installed
%define prefix /usr/lib/perfsonar/services/ps-mdm-sshtelnet-mp
# The full name of your package.
Name: perfsonar-java-sshtelnet-mp
# Version of the microrelease
Version: 1.3.4.2
License: Modified BSD License
# Package version. Increment if you create a new package of same microrelease
Release: 1
# short description of the package
Summary: perfSONAR SSH/Telnet Measurement Point
# The name of the source tarbal
Source0: %{name}-%{version}.tar.gz
# what should be used for buildpath, you don't need to change this
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
# in what RPM group will the RPM be installed, don't need to change
Group: Network/Web service
# YOU
packager: Blazej Pietrzak
<>
# What is the location of the source package
URL: http://www.perfsonar.org
# Forces to remove the renamed package
Obsoletes: ps-mdm-sshtelnet-mp
Conflicts: ps-mdm-sshtelnet-mp
# on what packages should the resulting package depend
Requires: tomcat5
Requires: tomcat5-exist
# For what architecture is this package meant
BuildArch: noarch
# What RPM packages are needed during build
#BuildRequires: maven2
#describe your package here
%description
The purpose of and the desired functionality expected from the perfSONAR
SSH/Telnet MP is that it should be able to contact underlying hardware
devices, and execute show-like commands on. It should primarily serve NOC's,
whom would be able to use a Looking Glass-style client to request real-time
configuration information about those devices.
%prep
%{__rm} -rf ${RPM_BUILD_DIR}/%{name}-%{version}
%setup -q
%build
pushd ${RPM_BUILD_DIR}/%{name}-%{version}/ant
ant webapp-package-create
popd
%install
# make the directory
rm -rf $RPM_BUILD_ROOT
%{__install} -d -m 755 ${RPM_BUILD_ROOT}%{prefix}
%{__install} -d -m 755 ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}
%{__install} -d -m 755 ${RPM_BUILD_ROOT}/usr/share/doc/%{name}
%{__install} -d -m 755 ${RPM_BUILD_ROOT}/usr/share/doc/%{name}/schema
%{__install} -d -m 755 ${RPM_BUILD_ROOT}/usr/share/doc/%{name}/samples
%{__install} -d -m 755
${RPM_BUILD_ROOT}/usr/share/doc/%{name}/samples/responses
%{__install} -d -m 755
${RPM_BUILD_ROOT}/usr/share/doc/%{name}/samples/requests
# copy the service content to the tomcat webapps directory
pushd ${RPM_BUILD_DIR}/%{name}-%{version}/tmp-webapps/webapps
# %{__cp} -a %{name}/* ${RPM_BUILD_ROOT}%{prefix}
%{__cp} -a ps-mdm-sshtelnet-mp/* ${RPM_BUILD_ROOT}%{prefix}
popd
pushd ${RPM_BUILD_DIR}/%{name}-%{version}/doc
%{__cp} -a * ${RPM_BUILD_ROOT}/usr/share/doc/%{name}
popd
pushd ${RPM_BUILD_DIR}/%{name}-%{version}/samples
%{__cp} -a * ${RPM_BUILD_ROOT}/usr/share/doc/%{name}/samples
popd
%post
## make symlink for easy access to conf
ln -s
/usr/lib/perfsonar/services/ps-mdm-sshtelnet-mp/WEB-INF/classes/perfsonar/conf/*.properties
/etc/ps-mdm-sshtelnet-mp
ln -s
/usr/lib/perfsonar/services/ps-mdm-sshtelnet-mp/WEB-INF/classes/perfsonar/conf/objects.config
/etc/ps-mdm-sshtelnet-mp
ln -s
/usr/lib/perfsonar/services/ps-mdm-sshtelnet-mp/WEB-INF/classes/perfsonar/conf/*.xml
/etc/ps-mdm-sshtelnet-mp
ln -s /usr/lib/perfsonar/services/ps-mdm-sshtelnet-mp
/var/lib/tomcat5/webapps/ps-mdm-sshtelnet-mp
ln -s /var/log/tomcat5 /var/log/ps-mdm-sshtelnet-mp
## restart tomcat
/sbin/service tomcat5 restart
chown tomcat:tomcat -R
/usr/lib/perfsonar/services/ps-mdm-sshtelnet-mp/WEB-INF/classes/perfsonar/
%preun
## remove symlink
%{__rm} -rf %{_sysconfdir}/%{name}/*.properties
%{__rm} -rf %{_sysconfdir}/%{name}/objects.config
%{__rm} -rf %{_sysconfdir}/%{name}/*.xml
%{__rm} -rf %{_var}/log/%{name}
%postun
## restart tomcat
/sbin/service tomcat5 restart
%clean
# clean up the durt
rm -rf $RPM_BUILD_ROOT
%files
%defattr(0644,root,tomcat,0755)
%attr(640,tomcat,tomcat) %config(noreplace)
%{prefix}/WEB-INF/classes/perfsonar/conf/*.properties
%attr(640,tomcat,tomcat) %config(noreplace)
%{prefix}/WEB-INF/classes/perfsonar/conf/objects.config
%attr(640,tomcat,tomcat) %config(noreplace)
%{prefix}/WEB-INF/classes/perfsonar/conf/*.xml
%{prefix}
%{_sysconfdir}/%{name}
/usr/share/doc/%{name}
/usr/share/doc/%{name}/schema
/usr/share/doc/%{name}/samples
/usr/share/doc/%{name}/samples/responses
/usr/share/doc/%{name}/samples/requests
%changelog
* Tue Jul 3 2009 Blazej Pietrzak
<>
1.3.4.1
- ps-base version: 1.0.200800902
- web-admin version: 0.9.3c
- Removed perfsonar-MDM-3.1 Admin Guide 1.0.pdf from the package
- Renamed the package from ps-mdm-sshtelnet-mp to perfsonar-java-sshtelnet-mp
* Tue Jan 13 2009 Stijn Melis
<>
1.3.4.1
- ps-base version: 1.0.200800902
- web-admin version: 0.9.3c
- Fixed problem with StrictHostKeyChecking
- Fixed LS registration problem
- Fixed bug when no devices are configured
* Tue Jan 13 2009 Stijn Melis
<>
1.3.4
- ps-base version: 1.0.20080902
- web-admin version: 0.9.3c
* Fri Dec 19 2008 Stijn Melis
<>
1.3.4RC8
- ps-base version: 1.0.20080902
- web-admin version: 0.9.3c
- Updated WebAdmin to use 0.9.3c
- Made sure that the directory for the temporary token files for the MP is
writeable by the tomcat user
* Thu Nov 27 2008 Stijn Melis
<>
1.3.4RC7
- ps-base version: 1.0.20080902
- web-admin version: 0.9.1c
- Updated WebAdmin to use 0.9.1c
- Fixed bug about the test page in the web admin
- Fixed small issue regarding logging information when a telnet session isn't
successfully established
* Tue Oct 28 2008 Stijn Melis
<>
1.3.4RC6
- ps-base version: 1.0.20080902
- web-admin version: 0.9.0c
- Updated WebAdmin to use 0.9.0c
* Wed Oct 22 2008 Stijn Melis
<>
1.3.4RC5
- ps-base version: 1.0.20080902
- web-admin version: 0.9.7b
- Fixed paths for logging when using deb file
- Updated WebAdmin to use 0.9.7b
* Wed Oct 15 2008 Stijn Melis
<>
1.3.4RC4
- ps-base version: 1.0.20080902
- web-admin version: 0.9.6b
- Fixed some descriptions in the WebAdmin
* Mon Oct 13 2008 Stijn Melis
<>
1.3.4RC3
- ps-base version: 1.0.20080902
- web-admin version: 0.9.6b
- Changed LS registration rating to 90000ms
- Fixed paths for logging
- Fixed bug in self-test
* Tue Sep 30 2008 Stijn Melis
<>
1.3.4RC2
- ps-base version: 1.0.20080902
- web-admin version: 0.9.6b
* Wed Sep 17 2008 Stijn Melis
<>
1.3.4RC1
- ps-base version: 1.0.20080902
- web-admin version: 0.9.3b
- added selftest and syslogging
- updated webadmin
* Wed Jun 18 2008 Stijn Melis
<>
1.3.3
- ps-base version: 1.0.20080310
- web-admin version: 0.8.3b
- fixed the design flaw which was related to the command parameters (had to
update the list of commands for this)
- added a parameter to the service.properties file, which defines a directory
to put the temporary token files
* Fri Jun 06 2008 Stijn Melis
<>
1.3.2
- ps-base version: 1.0.20080310
- web-admin version: 0.8.3b
- fixed the bug which prevented the SSHTELNET MP from registering to the LS
* Wed May 28 2008 Stijn Melis
<>
1.3.1
- ps-base version: 1.0.20080310
- web-admin version: 0.8.3b
- fixed the bug in the service.properties and wizard.properties files which
prevented the Authentication to work properly
- removed some unnecessary logging entries in some classes (too much printlns
which don't really add anything useful)
* Mon May 05 2008 Stijn Melis
<>
1.3
- ps-base version: 1.0.20080310
- web-admin version: 0.8.3b
- fixed the bug which prevented the MP from connecting to the eXist database
- fixed the bug which removed the groups in the webadmin once it was used
once
* Thu Mar 27 2008 Stijn Melis
<>
1.3RC4
- ps-base version: 1.0.20080310
- web-admin version: 0.8b
- no further fixes
* Thu Mar 06 2008 Stijn Melis
<>
1.3RC3
- fixed timeout bug in the telnet side of the SSHTELNET MP
* Mon Mar 03 2008 Stijn Melis
<>
1.3RC2
- fixed bug in the service.properties file
* Wed Feb 06 2008 Stijn Melis
<>
1.3RC1
- added Authentication
- changed eventTypes to be URL based
- changed metadata configuration to XML (now uses eXist database)
- added timeout parameter
- added maximum number of users parameter
- added web admin interface
- installation is now rpm based
- updated command list
# This is where all tomcat stuff will be installed
%define prefix /usr/lib/perfsonar/services/ps-mdm-sshtelnet-mp
# The full name of your package.
Name: ps-mdm-sshtelnet-mp
# Version of the microrelease
Version: 1.3.4.2
License: Modified BSD License
# Package version. Increment if you create a new package of same microrelease
Release: 1
# short description of the package
Summary: perfSONAR SSH/Telnet Measurement Point
# The name of the source tarbal
Source0: dummy-%{name}-%{version}.tar.gz
# what should be used for buildpath, you don't need to change this
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
# in what RPM group will the RPM be installed, don't need to change
Group: Network/Web service
# YOU
packager: Blazej Pietrzak
<>
# What is the location of the source package
URL: http://www.perfsonar.org
# on what packages should the resulting package depend
Requires: perfsonar-java-sshtelnet-mp
# For what architecture is this package meant
BuildArch: noarch
# What RPM packages are needed during build
#BuildRequires: maven2
#describe your package here
%description
The purpose of and the desired functionality expected from the perfSONAR
SSH/Telnet MP is that it should be able to contact underlying hardware
devices, and execute show-like commands on. It should primarily serve NOC's,
whom would be able to use a Looking Glass-style client to request real-time
configuration information about those devices. This is a dummy package used
to rename the package to perfsonar-java-sshtelnet-mp.
%prep
%{__rm} -rf ${RPM_BUILD_DIR}/%{name}-%{version}
%setup -q
%build
%install
# make the directory
# copy the service content to the tomcat webapps directory
%post
## make symlink for easy access to conf
%preun
%postun
%clean
# clean up the durt
rm -rf $RPM_BUILD_ROOT
%files
%changelog
* Tue Jul 3 2009 Blazej Pietrzak
<>
1.3.4.2
- ps-base version: 1.0.200800902
- web-admin version: 0.9.3c
- Renamed the package to perfsonar-java-sshtelnet-mp
- Removed Admin Guide from package
* Tue Jan 13 2009 Stijn Melis
<>
1.3.4.1
- ps-base version: 1.0.200800902
- web-admin version: 0.9.3c
- Fixed problem with StrictHostKeyChecking
- Fixed LS registration problem
- Fixed bug when no devices are configured
* Tue Jan 13 2009 Stijn Melis
<>
1.3.4
- ps-base version: 1.0.20080902
- web-admin version: 0.9.3c
* Fri Dec 19 2008 Stijn Melis
<>
1.3.4RC8
- ps-base version: 1.0.20080902
- web-admin version: 0.9.3c
- Updated WebAdmin to use 0.9.3c
- Made sure that the directory for the temporary token files for the MP is
writeable by the tomcat user
* Thu Nov 27 2008 Stijn Melis
<>
1.3.4RC7
- ps-base version: 1.0.20080902
- web-admin version: 0.9.1c
- Updated WebAdmin to use 0.9.1c
- Fixed bug about the test page in the web admin
- Fixed small issue regarding logging information when a telnet session isn't
successfully established
* Tue Oct 28 2008 Stijn Melis
<>
1.3.4RC6
- ps-base version: 1.0.20080902
- web-admin version: 0.9.0c
- Updated WebAdmin to use 0.9.0c
* Wed Oct 22 2008 Stijn Melis
<>
1.3.4RC5
- ps-base version: 1.0.20080902
- web-admin version: 0.9.7b
- Fixed paths for logging when using deb file
- Updated WebAdmin to use 0.9.7b
* Wed Oct 15 2008 Stijn Melis
<>
1.3.4RC4
- ps-base version: 1.0.20080902
- web-admin version: 0.9.6b
- Fixed some descriptions in the WebAdmin
* Mon Oct 13 2008 Stijn Melis
<>
1.3.4RC3
- ps-base version: 1.0.20080902
- web-admin version: 0.9.6b
- Changed LS registration rating to 90000ms
- Fixed paths for logging
- Fixed bug in self-test
* Tue Sep 30 2008 Stijn Melis
<>
1.3.4RC2
- ps-base version: 1.0.20080902
- web-admin version: 0.9.6b
* Wed Sep 17 2008 Stijn Melis
<>
1.3.4RC1
- ps-base version: 1.0.20080902
- web-admin version: 0.9.3b
- added selftest and syslogging
- updated webadmin
* Wed Jun 18 2008 Stijn Melis
<>
1.3.3
- ps-base version: 1.0.20080310
- web-admin version: 0.8.3b
- fixed the design flaw which was related to the command parameters (had to
update the list of commands for this)
- added a parameter to the service.properties file, which defines a directory
to put the temporary token files
* Fri Jun 06 2008 Stijn Melis
<>
1.3.2
- ps-base version: 1.0.20080310
- web-admin version: 0.8.3b
- fixed the bug which prevented the SSHTELNET MP from registering to the LS
* Wed May 28 2008 Stijn Melis
<>
1.3.1
- ps-base version: 1.0.20080310
- web-admin version: 0.8.3b
- fixed the bug in the service.properties and wizard.properties files which
prevented the Authentication to work properly
- removed some unnecessary logging entries in some classes (too much printlns
which don't really add anything useful)
* Mon May 05 2008 Stijn Melis
<>
1.3
- ps-base version: 1.0.20080310
- web-admin version: 0.8.3b
- fixed the bug which prevented the MP from connecting to the eXist database
- fixed the bug which removed the groups in the webadmin once it was used
once
* Thu Mar 27 2008 Stijn Melis
<>
1.3RC4
- ps-base version: 1.0.20080310
- web-admin version: 0.8b
- no further fixes
* Thu Mar 06 2008 Stijn Melis
<>
1.3RC3
- fixed timeout bug in the telnet side of the SSHTELNET MP
* Mon Mar 03 2008 Stijn Melis
<>
1.3RC2
- fixed bug in the service.properties file
* Wed Feb 06 2008 Stijn Melis
<>
1.3RC1
- added Authentication
- changed eventTypes to be URL based
- changed metadata configuration to XML (now uses eXist database)
- added timeout parameter
- added maximum number of users parameter
- added web admin interface
- installation is now rpm based
- updated command list
- Transition to new naming policy, Błażej Pietrzak, 07/03/2009
- Re: [gn3-sa2-t3] Transition to new naming policy, Jochen Reinwand, 07/03/2009
- Re: [gn3-sa2-t3] Transition to new naming policy, Błażej Pietrzak, 07/06/2009
- Re: [gn3-sa2-t3] Transition to new naming policy, Jochen Reinwand, 07/03/2009
Archive powered by MHonArc 2.6.16.