Bug 38248 - wrong patchlevel=0 directory for 4.0-1
wrong patchlevel=0 directory for 4.0-1
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Update - Repository administration
UCS 4.0
Other Linux
: P5 normal (vote)
: UCS 4.0-1-errata
Assigned To: Philipp Hahn
Stefan Gohmann
:
Depends on: 35927 36269
Blocks: 35537 38509 38615
  Show dependency treegraph
 
Reported: 2015-04-13 14:56 CEST by Philipp Hahn
Modified: 2015-05-28 09:32 CEST (History)
3 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Hahn univentionstaff 2015-04-13 14:56:12 CEST
# cat /cdrom/.univention_install 
VERSION=4.0
PATCHLEVEL=1

# ls -l /cdrom/dists/
lr-xr-xr-x 1 root root    6 Feb  9 15:37 stable -> ucs401
dr-xr-xr-x 1 root root 2048 Feb  9 15:37 ucs401

# univention-repository-create -i UCS_4.0-1-amd64.iso -n
...
# ls /var/lib/univention-repository/mirror/4.0/maintained
4.0-0

univention-repository-create:
295     _repo_base = os.path.join(_mirror_base,
296                   'mirror',                                       
297                   '%s.%s' % (options.major_version, options.minor_version), 
298                   'maintained',
299                   '%s.%s-0' % (options.major_version, options.minor_version))

univention-repository-update:
208               inst_fd.write( 'PATCHLEVEL=0\n' )

+++ This bug was initially created as a clone of Bug #36269 +++
+++ This bug was initially created as a clone of Bug #35927 +++
Comment 1 Stefan Gohmann univentionstaff 2015-04-13 16:53:57 CEST
(In reply to Philipp Hahn from comment #0)
> # univention-repository-create -i UCS_4.0-1-amd64.iso -n
> ...
> # ls /var/lib/univention-repository/mirror/4.0/maintained
> 4.0-0

As far as I remember, it should only be possible to use the patchlevel 0 dvd to create a local repository.
Comment 2 Stefan Gohmann univentionstaff 2015-04-14 08:06:09 CEST
(In reply to Stefan Gohmann from comment #1)
> As far as I remember, it should only be possible to use the patchlevel 0 dvd
> to create a local repository.

Or rather a local repository must start with the patchlevel 0.
Comment 3 Philipp Hahn univentionstaff 2015-04-23 14:02:42 CEST
r60122 | Bug #35537 Up: Fix package build
r60111 | Bug #38248 Up: Prepare for code change
r60110 | Bug #38248 Up: Fix patchlevel for local repository
 The DVD is copied to 4.0-1
 The warning is printed when minor!=0 or patchlevel!=0.

Package: univention-updater
Version: 10.0.53-13.1387.201504231330
Branch: ucs_4.0-0
Scope: errata4.0-1

r60127 | Bug #38248,Bug #35537: Profile based installation YAML
 2015-04-23-univention-updater.yaml
Comment 4 Stefan Gohmann univentionstaff 2015-05-05 07:59:12 CEST
I got a traceback while trying to create a local repository. I've used 'univention-repository-create -i UCS_4.0-1-CORE-Edition-amd64.iso'

Please insert a UCS installation medium and press <Enter>
 Mounting /media/cdrom ... done.
Checking medium in /media/cdrom ... ok.
Setting repository/mirror
File: /etc/apt/mirror.list
Copying data. Please be patient ...
  copying version information ... done.
  copying packages ... done.
Creating indexes ... i386 amd64 all done.
/usr/lib/python2.7/dist-packages/debian/deb822.py:200: UnicodeWarning: decoding from utf-8 failed; attempting to detect the true encoding
  UnicodeWarning)
  generating Package files for installer ... Setting repository/online/server
Create repository/mirror/version/start
Create repository/mirror/version/end
File: /etc/apt/mirror.list
File: /etc/apt/sources.list.d/15_ucs-online-version.list
File: /etc/apt/sources.list.d/20_ucs-online-component.list

The local repository has been created.

The local host has been modified to use this local repository.  Other hosts
must be re-configured by setting the Univention Configuration Registry (UCR)
variable 'repository/online/server' to the FQDN of this host.

  ucr set repository/online/server="master421.deadlock42.intranet"

UCS validates the archive integrity through signed Release files (using the
secure APT mechanism).  Secure APT is not yet available for local repositories.
As such, it must be disabled on this and all other hosts using this
repository by setting the UCR variable 'update/secure_apt' to no:

  ucr set update/secure_apt=no

Both settings are best set in a domain by defining UCR Policies, which
set these variables on all hosts using this repository server. For example:

  udm policies/repositoryserver create \
    --position "cn=repository,cn=update,cn=policies,dc=deadlock42,dc=intranet" \
    --set name="master421 repository" \
    --set repositoryServer="master421.deadlock42.intranet"
  udm policies/registry create \
    --position "cn=config-registry,cn=policies,dc=deadlock42,dc=intranet" \
    --set name="global settings" \
    --set registry="update/secure_apt no"
  udm container/dc modify \
    --dn "dc=deadlock42,dc=intranet" \
    --policy-reference "cn=global settings,cn=config-registry,cn=policies,dc=deadlock42,dc=intranet" \
    --policy-reference "cn=master421 repository,cn=repository,cn=update,cn=policies,dc=deadlock42,dc=intranet"

Traceback (most recent call last):
  File "/usr/sbin/univention-repository-create", line 393, in <module>
    main()
  File "/usr/sbin/univention-repository-create", line 380, in main
    if options.version.minor != 0 or options.verion.patchlevel != 0:
AttributeError: Values instance has no attribute 'verion'
root@master421:~#
Comment 5 Philipp Hahn univentionstaff 2015-05-05 08:38:30 CEST
(In reply to Stefan Gohmann from comment #4)
> I got a traceback while trying to create a local repository.
...
> Traceback (most recent call last):
>   File "/usr/sbin/univention-repository-create", line 393, in <module>
>     main()
>   File "/usr/sbin/univention-repository-create", line 380, in main
>     if options.version.minor != 0 or options.verion.patchlevel != 0:
> AttributeError: Values instance has no attribute 'verion'

r60382 | Bug #38248 up: Fix patchlevel for local repository

Package: univention-updater
Version: 10.0.53-14.1388.201505050831
Branch: ucs_4.0-0
Scope: errata4.0-1

r60383 | Bug #38248 up: Fix patchlevel for local repository YAML
 2015-04-23-univention-updater.yaml
Comment 6 Philipp Hahn univentionstaff 2015-05-05 15:18:57 CEST
r60417 | Bug #38248 up: Fix major version number printing
 minor → major version

Package: univention-updater
Version: 10.0.53-15.1389.201505051507
Branch: ucs_4.0-0
Scope: errata4.0-1

r60419 | Bug #38248 up: Fix major version number printing YAML
 2015-04-23-univention-updater.yaml
Comment 7 Philipp Hahn univentionstaff 2015-05-05 15:39:43 CEST
r60420 | Bug #38248 Up: drop details from message
 Strip (confusing) version details

Package: univention-updater
Version: 10.0.53-16.1390.201505051532
Branch: ucs_4.0-0
Scope: errata4.0-1

r60422 | Bug #38248 Up: drop details from message YAML
 2015-04-23-univention-updater.yaml
Comment 8 Stefan Gohmann univentionstaff 2015-05-05 15:55:55 CEST
Code review: OK

YAML: OK

Tests: OK
Comment 9 Janek Walkenhorst univentionstaff 2015-05-07 17:40:12 CEST
<http://errata.univention.de/ucs/4.0/186.html>