Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Shawn Webb
pkg
Commits
4cbe6a47
Commit
4cbe6a47
authored
Mar 27, 2021
by
Baptiste Daroussin
Browse files
plist: remove support for ancient pkg tools time
parent
12d7f45a
Changes
4
Hide whitespace changes
Inline
Side-by-side
NEWS
View file @
4cbe6a47
Changes from 1.16.99.3 to 1.16.99.4
- expose the name of the packages to its scripts lua and shell
- remove internal support for @*exec
- remove support for @ignore
- plist: remove internal support for @*exec
- plist: remove support for @ignore
- plist: remove suppot for @dirrm/@dirrmtry
- plist: remove support for @pkgdep
- plist: remove stub support for @stopdaemon
- plist: remove stub support for @display
- plist: remove stub support for @mtree
- plist: remove stub support for @conflict
Changes from 1.16.99.2 to 1.16.99.3
- lua update to 5.4.2
...
...
libpkg/pkg_ports.c
View file @
4cbe6a47
...
...
@@ -59,7 +59,6 @@ static ucl_object_t *keyword_schema = NULL;
static
int
setprefix
(
struct
plist
*
,
char
*
,
struct
file_attr
*
);
static
int
dir
(
struct
plist
*
,
char
*
,
struct
file_attr
*
);
static
int
dirrm
(
struct
plist
*
,
char
*
,
struct
file_attr
*
);
static
int
file
(
struct
plist
*
,
char
*
,
struct
file_attr
*
);
static
int
setmod
(
struct
plist
*
,
char
*
,
struct
file_attr
*
);
static
int
setowner
(
struct
plist
*
,
char
*
,
struct
file_attr
*
);
...
...
@@ -68,7 +67,6 @@ static int comment_key(struct plist *, char *, struct file_attr *);
static
int
config
(
struct
plist
*
,
char
*
,
struct
file_attr
*
);
/* compat with old packages */
static
int
name_key
(
struct
plist
*
,
char
*
,
struct
file_attr
*
);
static
int
pkgdep
(
struct
plist
*
,
char
*
,
struct
file_attr
*
);
static
int
include_plist
(
struct
plist
*
,
char
*
,
struct
file_attr
*
);
static
struct
action_cmd
{
...
...
@@ -77,8 +75,6 @@ static struct action_cmd {
size_t
namelen
;
}
list_actions
[]
=
{
{
"setprefix"
,
setprefix
,
9
},
{
"dirrm"
,
dirrm
,
5
},
{
"dirrmtry"
,
dirrm
,
7
},
{
"dir"
,
dir
,
3
},
{
"file"
,
file
,
4
},
{
"setmode"
,
setmod
,
6
},
...
...
@@ -88,7 +84,6 @@ static struct action_cmd {
{
"config"
,
config
,
6
},
/* compat with old packages */
{
"name"
,
name_key
,
4
},
{
"pkgdep"
,
pkgdep
,
6
},
{
NULL
,
NULL
,
0
}
};
...
...
@@ -222,16 +217,6 @@ name_key(struct plist *p, char *line, struct file_attr *a __unused)
return
(
EPKG_OK
);
}
static
int
pkgdep
(
struct
plist
*
p
,
char
*
line
,
struct
file_attr
*
a
__unused
)
{
if
(
*
line
!=
'\0'
)
{
free
(
p
->
pkgdep
);
p
->
pkgdep
=
xstrdup
(
line
);
}
return
(
EPKG_OK
);
}
static
int
lua_meta
(
lua_State
*
L
,
int
(
*
perform
)(
struct
plist
*
,
char
*
,
struct
file_attr
*
))
...
...
@@ -314,27 +299,6 @@ dir(struct plist *p, char *line, struct file_attr *a)
return
(
ret
);
}
static
void
warn_deprecated_dir
(
void
)
{
static
bool
warned_deprecated_dir
=
false
;
if
(
warned_deprecated_dir
)
return
;
warned_deprecated_dir
=
true
;
pkg_emit_error
(
"Warning: @dirrm[try] is deprecated, please"
" use @dir"
);
}
static
int
dirrm
(
struct
plist
*
p
,
char
*
line
,
struct
file_attr
*
a
)
{
warn_deprecated_dir
();
return
(
dir
(
p
,
line
,
a
));
}
static
int
meta_file
(
struct
plist
*
p
,
char
*
line
,
struct
file_attr
*
a
,
bool
is_config
)
{
...
...
@@ -486,40 +450,8 @@ setgroup(struct plist *p, char *line, struct file_attr *a __unused)
}
static
int
comment_key
(
struct
plist
*
p
,
char
*
line
,
struct
file_attr
*
a
__unused
)
comment_key
(
struct
plist
*
p
,
char
*
line
__unused
,
struct
file_attr
*
a
__unused
)
{
char
*
name
,
*
version
,
*
line_options
,
*
line_options2
,
*
option
;
if
(
strncmp
(
line
,
"DEPORIGIN:"
,
10
)
==
0
)
{
line
+=
10
;
name
=
p
->
pkgdep
;
if
(
name
!=
NULL
)
{
version
=
strrchr
(
name
,
'-'
);
version
[
0
]
=
'\0'
;
version
++
;
pkg_adddep
(
p
->
pkg
,
name
,
line
,
version
,
false
);
free
(
p
->
pkgdep
);
}
p
->
pkgdep
=
NULL
;
}
else
if
(
strncmp
(
line
,
"ORIGIN:"
,
7
)
==
0
)
{
line
+=
7
;
free
(
p
->
pkg
->
origin
);
p
->
pkg
->
origin
=
xstrdup
(
line
);
}
else
if
(
strncmp
(
line
,
"OPTIONS:"
,
8
)
==
0
)
{
line
+=
8
;
/* OPTIONS:+OPTION -OPTION */
if
(
line
[
0
]
!=
'\0'
)
{
line_options2
=
line_options
=
xstrdup
(
line
);
while
((
option
=
strsep
(
&
line_options
,
" "
))
!=
NULL
)
{
if
((
option
[
0
]
==
'+'
||
option
[
0
]
==
'-'
)
&&
option
[
1
]
!=
'\0'
&&
isupper
(
option
[
1
]))
pkg_addoption
(
p
->
pkg
,
option
+
1
,
option
[
0
]
==
'+'
?
"on"
:
"off"
);
}
free
(
line_options2
);
}
}
/* ignore md5 will be recomputed anyway */
return
(
EPKG_OK
);
}
...
...
@@ -532,19 +464,12 @@ static struct keyact {
{
"comment"
,
comment_key
},
{
"config"
,
config
},
{
"dir"
,
dir
},
{
"dirrm"
,
dirrm
},
{
"dirrmtry"
,
dirrm
},
{
"include"
,
include_plist
},
{
"mode"
,
setmod
},
{
"owner"
,
setowner
},
{
"group"
,
setgroup
},
/* old pkg compat */
{
"name"
,
name_key
},
{
"pkgdep"
,
pkgdep
},
{
"mtree"
,
comment_key
},
{
"stopdaemon"
,
comment_key
},
{
"display"
,
comment_key
},
{
"conflicts"
,
comment_key
},
{
NULL
,
NULL
},
};
...
...
@@ -1126,7 +1051,6 @@ plist_free(struct plist *p)
HASH_FREE
(
p
->
keywords
,
keyword_free
);
free
(
p
->
pkgdep
);
free
(
p
->
uname
);
free
(
p
->
gname
);
free
(
p
->
post_patterns
.
buf
);
...
...
libpkg/private/pkg.h
View file @
4cbe6a47
...
...
@@ -652,8 +652,6 @@ struct plist {
char
*
uname
;
char
*
gname
;
const
char
*
slash
;
char
*
pkgdep
;
bool
ignore_next
;
int64_t
flatsize
;
hardlinks_t
*
hardlinks
;
mode_t
perm
;
...
...
tests/frontend/create.sh
View file @
4cbe6a47
...
...
@@ -9,8 +9,6 @@ tests_init \
create_from_plist_gather_mode
\
create_from_plist_set_mode
\
create_from_plist_mini
\
create_from_plist_dirrm
\
create_from_plist_ignore
\
create_from_plist_fflags create_from_plist_bad_fflags
\
create_from_plist_with_keyword_arguments
\
create_from_manifest_and_plist
\
...
...
@@ -205,47 +203,6 @@ create_from_plist_mini_body() {
bsdtar tvf test-1.pkg
}
create_from_plist_dirrm_body
()
{
mkdir
testdir
genmanifest
for
dir
in
dirrm dirrmtry
;
do
rm
test.plist
genplist
"@
${
dir
}
testdir"
atf_check
\
-o
empty
\
-e
inline:
"
${
PROGNAME
}
: Warning: @dirrm[try] is deprecated, please use @dir
\n
"
\
pkg create
-o
${
TMPDIR
}
-m
.
-p
test.plist
-r
.
basic_validation
done
}
create_from_plist_ignore_body
()
{
genmanifest
genplist
"@ignore
aline"
atf_check
\
-o
empty
\
-e
empty
\
pkg create
-o
${
TMPDIR
}
-m
.
-p
test.plist
-r
.
basic_validation
atf_check
\
-o
inline:
"+COMPACT_MANIFEST
\n
+MANIFEST
\n
"
\
-e
empty
\
-s
exit
:0
\
bsdtar tf test-1.pkg
atf_check
\
-o
empty
\
-e
inline:
"
${
PROGNAME
}
: Warning: @ignore is deprecated
\n
"
\
pkg
-o
DEVELOPER_MODE
=
yes
create
-o
${
TMPDIR
}
-m
.
-p
test.plist
-r
.
}
create_from_plist_fflags_body
()
{
atf_skip_on Linux does not support fflags
preparetestcredentials
"(,,,schg)"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment