aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/e/e_repository_sets_TEST_setup.sh
blob: b6167e846fbb1ae13edd2cb8fffc8fe859a6eeae (plain)
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
#!/bin/bash
# vim: set ft=sh sw=4 sts=4 et :

mkdir e_repository_sets_TEST_dir || exit 1
cd e_repository_sets_TEST_dir || exit 1

mkdir -p repo1/{eclass,distfiles,profiles/profile,sets,metadata/glsa} || exit 1
cd repo1 || exit 1

echo "test-repo-1" > profiles/repo_name || exit 1
cat <<END > profiles/categories || exit 1
cat-one
cat-two
cat-three
END
cat <<END > profiles/profile/make.defaults
ARCH=test
END

cat <<END > sets/set1.conf
* cat-one/foo
? >=cat-two/bar-2
? <cat-three/baz-1.2
END

mkdir -p cat-one/foo cat-two/bar cat-three/baz
cat <<END > cat-one/foo/foo-1.ebuild
SLOT="0"
KEYWORDS="test"
END
cp cat-one/foo/foo-1.ebuild cat-one/foo/foo-2.ebuild
cp cat-one/foo/foo-1.ebuild cat-one/foo/foo-2.1.ebuild
cp cat-one/foo/foo-1.ebuild cat-two/bar/bar-1.5.ebuild
cp cat-one/foo/foo-1.ebuild cat-two/bar/bar-1.5.1.ebuild
cp cat-one/foo/foo-1.ebuild cat-two/bar/bar-2.0.ebuild
cp cat-one/foo/foo-1.ebuild cat-three/baz/baz-1.0.ebuild
cp cat-one/foo/foo-1.ebuild cat-three/baz/baz-1.1.ebuild
cp cat-one/foo/foo-1.ebuild cat-three/baz/baz-1.1-r1.ebuild
cp cat-one/foo/foo-1.ebuild cat-three/baz/baz-1.1-r2.ebuild
cp cat-one/foo/foo-1.ebuild cat-three/baz/baz-1.2.ebuild
cp cat-one/foo/foo-1.ebuild cat-three/baz/baz-1.2-r1.ebuild
cp cat-one/foo/foo-1.ebuild cat-three/baz/baz-1.3.ebuild
cat <<END > cat-three/baz/baz-1.3.1.ebuild
SLOT="0"
KEYWORDS="~test"
END

cat <<END > metadata/glsa/glsa-123456-78.xml
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet href="/xsl/glsa.xsl" type="text/xsl"?>
<?xml-stylesheet href="/xsl/guide.xsl" type="text/xsl"?>
<!DOCTYPE glsa SYSTEM "http://www.gentoo.org/dtd/glsa.dtd">

<glsa id="123456-78">
  <title>
    Foo: insecure XYZ
  </title>
  <synopsis>
    Foo can be made to XYZ insecurely.
  </synopsis>
  <product type="ebuild">foo</product>
  <announced>May 26, 2007</announced>
  <revised>May 26, 2007: 01</revised>
  <bug>123456</bug>
  <access>local</access>
  <affected>
    <package name="cat-one/foo" auto="yes" arch="*">
      <unaffected range="ge">2</unaffected>
      <vulnerable range="lt">2</vulnerable>
    </package>
  </affected>
  <background>
    <p>
    Foo is a Foo.
    </p>
  </background>
  <description>
    <p>
    Foo can be exploited to perform XYZ without authorisation.
    </p>
  </description>
  <impact type="high">
    <p>
    XYZ could happen insecurely.
    </p>
  </impact>
  <workaround>
    <p>
    There is no known workaround at this time.
    </p>
  </workaround>
  <resolution>
    <p>
    All Foo users should upgrade to the latest version.
    </p>
  </resolution>
  <references>
  </references>
</glsa>
END

cat <<END > metadata/glsa/glsa-314159-26.xml
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet href="/xsl/glsa.xsl" type="text/xsl"?>
<?xml-stylesheet href="/xsl/guide.xsl" type="text/xsl"?>
<!DOCTYPE glsa SYSTEM "http://www.gentoo.org/dtd/glsa.dtd">

<glsa id="314159-26">
  <title>
    Bar: unauthenticated QWERTY
  </title>
  <synopsis>
    Bar allows QWERTY by remote users.
  </synopsis>
  <product type="ebuild">bar</product>
  <announced>May 26, 2007</announced>
  <revised>May 26, 2007: 01</revised>
  <bug>314159</bug>
  <access>local</access>
  <affected>
    <package name="cat-two/bar" auto="yes" arch="*">
      <unaffected range="gt">1.5.1</unaffected>
      <vulnerable range="le">1.5.1</vulnerable>
    </package>
  </affected>
  <background>
    <p>
    Bar is a Bar.
    </p>
  </background>
  <description>
    <p>
    Remote users can bypass authentication to perform QWERTY.
    </p>
  </description>
  <impact type="high">
    <p>
    QWERTY can be performed by remote users.
    </p>
  </impact>
  <workaround>
    <p>
    There is no known workaround at this time.
    </p>
  </workaround>
  <resolution>
    <p>
    All Bar users should upgrade to the latest version.
    </p>
  </resolution>
  <references>
  </references>
</glsa>
END

cat <<END > metadata/glsa/glsa-987654-32.xml
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet href="/xsl/glsa.xsl" type="text/xsl"?>
<?xml-stylesheet href="/xsl/guide.xsl" type="text/xsl"?>
<!DOCTYPE glsa SYSTEM "http://www.gentoo.org/dtd/glsa.dtd">

<glsa id="987654-32">
  <title>
   Baz: ABC overflow
  </title>
  <synopsis>
    Baz can be made to ABC too many times.
  </synopsis>
  <product type="ebuild">bar</product>
  <announced>May 26, 2007</announced>
  <revised>May 26, 2007: 01</revised>
  <bug>987654</bug>
  <access>local</access>
  <affected>
    <package name="cat-three/baz" auto="yes" arch="*">
      <unaffected range="ge">1.3.1</unaffected>
      <vulnerable range="lt">1.3.1</vulnerable>
      <unaffected range="rge">1.2-r1</unaffected>
      <unaffected range="rle">1.1-r1</unaffected>
      <unaffected range="eq">1.3</unaffected>
    </package>
  </affected>
  <background>
    <p>
    Baz is a Baz.
    </p>
  </background>
  <description>
    <p>
    Attempting to make Baz ABC too many times causes an overflow.
    </p>
  </description>
  <impact type="high">
    <p>
    ABC can be overflowed.
    </p>
  </impact>
  <workaround>
    <p>
    There is no known workaround at this time.
    </p>
  </workaround>
  <resolution>
    <p>
    All Bar users should upgrade to the latest version.
    </p>
  </resolution>
  <references>
  </references>
</glsa>
END

cd ..