Project

General

Custom queries

Profile

Actions

Bug #10308

closed

Fix RPM distribution

Added by Brinette Pierre-Emmanuel almost 10 years ago. Updated almost 10 years ago.

Status:
Resolved
Priority:
Low
Assigned To:
Category:
-
Start date:
07/06/2015
Due date:
% Done:

0%

Estimated time:

Description

Upgrading treqs RPM packages conflict with previous version.

# rpm -Uvh  treqs-delivery-1.0-20150703.143750-35.rpm
Preparing...                ########################################### [100%]
    package treqs-1.7-0.x86_64 is already installed
    file /opt/treqs-1.7.0/etc/logback.xml from install of treqs-1.7-0.x86_64 conflicts with file from package treqs-1.7-0.x86_64
    file /opt/treqs-1.7.0/etc/version.txt from install of treqs-1.7-0.x86_64 conflicts with file from package treqs-1.7-0.x86_64
    file /opt/treqs-1.7.0/lib/treqs-java-1.0-SNAPSHOT.jar from install of treqs-1.7-0.x86_64 conflicts with file from package treqs-1.7-0.x86_64

Request :

  1. Fix conflict with file treqs-java-1.0-SNAPSHOT.jar
  2. Do not overwrite existing config files. Instead install new file with ".rpmnew" extensions. IE:
    /opt/treqs-1.7.0/etc/logback.xml.rpmnew
    
    /opt/treqs-1.7.0/etc/version.txt.rpmnew
    
Actions #1

Updated by Chambon Bernard almost 10 years ago

  1. To face this requirement I have set the build date as rpm release
    (the same value as the one used for version.txt e.g. 20150709.145932)
    >rpm -q --info treqs
    Name        : treqs                        Relocations: /opt/treqs-1.7.0 
    Version     : 1.7.0                             Vendor: IN2P3 Computing Center
    Release     : 20150709.145932               Build Date: Thu 09 Jul 2015 02:59:35 PM CEST
    ...
    
  2. now rpm -U works (No conflict encountered)
    > rpm -U /tmp//repo/fr/in2p3/cc/storage/treqs/treqs-delivery/1.0-SNAPSHOT/treqs-delivery-1.0-20150709.131803-130.rpm
    >
    
  3. Remember that file in etc/ are flagged as 'noreplace', so rpm -U will update package without changing files in etc/
    To provide new file content in etc/ uses --replacefiles. In such case new file will be suffixed .rpmnew (and existing files leaved unchanged)
    e.g.
    > rpm -U --replacefiles /tmp//repo/fr/in2p3/cc/storage/treqs/treqs-delivery/1.0-SNAPSHOT/treqs-delivery-1.0-20150709.125455-126.rpm 
    warning: /opt/treqs-1.7.0/etc/my-wrapper.conf created as /opt/treqs-1.7.0/etc/my-wrapper.conf.rpmnew
    >
    
Actions #2

Updated by Chambon Bernard almost 10 years ago

  • Status changed from Assigned to In progress
Actions #3

Updated by Chambon Bernard almost 10 years ago

  • Status changed from In progress to Resolved
Actions

Also available in: Atom PDF