-
Notifications
You must be signed in to change notification settings - Fork 65
/
Copy pathlegacy
77 lines (67 loc) · 3.29 KB
/
legacy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
# Copyright (c) 2020, 2024, Oracle and/or its affiliates.
#
#
# Specify which packages are to be moved to 'legacy' namespace. Please see
# doc/packaging.txt section "Component EOF (End Of Feature)". This file is
# needed only for special cases, usually you just want to add 'set
# name=pkg.legacy value=true' to your packages.
#
#
# Name the affected packages and depend actions here. The lines here just
# 'mark' the lines by setting 'mark_legacy' attribute. All such marked lines
# will be processed below.
# An example can be:
# <transform set name=pkg.fmri value=(pkg:/+)?.*(my/package) -> set mark_legacy true>
# matching multiple packages is possible
# <transform set name=pkg.fmri value=(pkg:/+)?.*(library/perl-5/.*-522.*) -> set mark_legacy true>
#
# Perl 5.36 and all related packages
<transform set name=pkg.fmri value=(pkg:/+)?.*(-536).* -> set mark_legacy true>
# Python 3.9 and all related packages
<transform set name=pkg.fmri value=(pkg:/+)?.*(-39).* -> set mark_legacy true>
# Beware that it's not easy to put python (or perl/ruby) module to legacy if
# you are at the same time putting to legacy one python (perl/ruby) version.
# For example if you put 'set name=pkg.legacy value=true' into
# components/python/enum/enum-PYVER.p5m and you are having python 27 runtime in
# legacy, then library/python/enum-27 will obtain the line twice. Once from
# *.p5m and once from this transform for every python 2.7 module. And the full
# build fails as pkglint throws an error on that duplicate line. So it's
# probably easier for such modules to list them here instead of putting the
# legacy to *.p5m.
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
# Automatic processing starts here, no change is needed beyond this line
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
#
# Make sure that we don't modify packages created from the history files
# (tools/generate-history adds do_not_move_to_legacy=true)
#
# First we remove (unmark) the package by removing the mark_legacy attribute
<transform set name=pkg.fmri do_not_move_to_legacy=true mark_legacy=.* -> delete mark_legacy .*>
# Now we can get rid of do_not_move_to_legacy attribute as we don't need it anymore
<transform set name=pkg.fmri do_not_move_to_legacy=.* -> delete do_not_move_to_legacy .*>
# Add legacy metadata
<transform set name=pkg.fmri mark_legacy=true -> \
emit set name=pkg.legacy value=true>
# remove mark_legacy attribute as we don't need it anymore
<transform set name=pkg.fmri mark_legacy=.* -> delete mark_legacy .*>