Skip to content

Commit

Permalink
Merge pull request #1 from spuck/fix_old_pkg-config
Browse files Browse the repository at this point in the history
Fixes cifsd-team#310. Add '-f' to 'rm' command in uninstall hooks to avoid error messages if file does not exist.
  • Loading branch information
spuck authored Nov 16, 2023
2 parents 711031d + d9cb5f7 commit dbebc23
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 4 deletions.
2 changes: 1 addition & 1 deletion addshare/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ install-exec-hook: uninstall-hook
$(LN_S) $(libexecdir)/ksmbd.tools ksmbd.addshare )

uninstall-hook:
-rm $(DESTDIR)$(sbindir)/ksmbd.addshare
-rm -f "$(DESTDIR)$(sbindir)/ksmbd.addshare"
2 changes: 1 addition & 1 deletion adduser/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ install-exec-hook: uninstall-hook
$(LN_S) $(libexecdir)/ksmbd.tools ksmbd.adduser )

uninstall-hook:
-rm $(DESTDIR)$(sbindir)/ksmbd.adduser
-rm -f "$(DESTDIR)$(sbindir)/ksmbd.adduser"
15 changes: 15 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,21 @@ AC_PROG_SED
AC_PROG_MKDIR_P
AC_PROG_LN_S

# Check if PKG_CHECK_VAR exists for compatibility with older (pre-version 0.28) pkg-config
m4_ifndef([PKG_CHECK_VAR], [
# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
# -------------------------------------------
# Retrieves the value of the pkg-config variable for the given module.
AC_DEFUN([PKG_CHECK_VAR],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
_PKG_CONFIG([$1], [variable="][$3]["], [$2])
AS_VAR_COPY([$1], [pkg_cv_][$1])
AS_VAR_IF([$1], [""], [$5], [$4])dnl
])# PKG_CHECK_VAR
])

AC_SUBST([in_script], [[\
'$(SED) -e "s,[@]sbindir[@],$(sbindir),g" \
-e "s,[@]sysconfdir[@],$(sysconfdir),g" \
Expand Down
2 changes: 1 addition & 1 deletion control/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ install-exec-hook: uninstall-hook
$(LN_S) $(libexecdir)/ksmbd.tools ksmbd.control )

uninstall-hook:
-rm $(DESTDIR)$(sbindir)/ksmbd.control
-rm -f "$(DESTDIR)$(sbindir)/ksmbd.control"
2 changes: 1 addition & 1 deletion mountd/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ install-exec-hook: uninstall-hook
$(LN_S) $(libexecdir)/ksmbd.tools ksmbd.mountd )

uninstall-hook:
-rm $(DESTDIR)$(sbindir)/ksmbd.mountd
-rm -f "$(DESTDIR)$(sbindir)/ksmbd.mountd"

1 comment on commit dbebc23

@Neustradamus
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dear @spuck,

I wish you a Happy New Year 2024!

Have you seen the comment of @atheik on your PR?

Thanks in advance.

Please sign in to comment.