Skip to content

Commit

Permalink
Build package with dpkg-buildpackage
Browse files Browse the repository at this point in the history
  • Loading branch information
liuh-80 committed Sep 18, 2021
1 parent 8d70ebb commit db26d95
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 10 deletions.
5 changes: 0 additions & 5 deletions src/tacacs/bash/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,7 @@ MAIN_TARGET = bash-tacplus_$(NSS_TACPLUS_VERSION)_$(CONFIGURED_ARCH).deb
$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
pushd ./bash_tacplus

# config source code
autoreconf
./configure

# build bash_tacplus
make
dpkg-buildpackage -rfakeroot -b -us -uc -j$(SONIC_CONFIG_MAKE_JOBS) --admindir $(SONIC_DPKG_ADMINDIR)

# run UT after build package
Expand Down
10 changes: 5 additions & 5 deletions src/tacacs/bash/bash_tacplus/bash_tacplus.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ int tacacs_ctrl;
*/
void output_verbose(const char *format, ...)
{
fprintf (stderr, "TACACS+: ");
fprintf(stderr, "TACACS+: ");
syslog(LOG_INFO,"TACACS+: ");

// convert log to a string because va args resoursive issue:
Expand All @@ -51,8 +51,8 @@ void output_verbose(const char *format, ...)
vsnprintf(logBuffer, sizeof(logBuffer), format, args);
va_end (args);

fprintf (stderr, logBuffer);
syslog(LOG_INFO, logBuffer);
fprintf(stderr, "%s", logBuffer);
syslog(LOG_INFO, "%s", logBuffer);
}

/*
Expand All @@ -71,8 +71,8 @@ void output_error(const char *format, ...)
vsnprintf(logBuffer, sizeof(logBuffer), format, args);
va_end (args);

fprintf (stderr, logBuffer);
syslog(LOG_ERR, logBuffer);
fprintf(stderr, "%s", logBuffer);
syslog(LOG_ERR, "%s", logBuffer);
}

/*
Expand Down
1 change: 1 addition & 0 deletions src/tacacs/bash/bash_tacplus/debian/compat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
10
27 changes: 27 additions & 0 deletions src/tacacs/bash/bash_tacplus/debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
#export DH_VERBOSE = 1


# see FEATURE AREAS in dpkg-buildflags(1)
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# see ENVIRONMENT in dpkg-buildflags(1)
# package maintainers to append CFLAGS
#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
# package maintainers to append LDFLAGS
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed


%:
dh $@


override_dh_auto_configure:
dh_auto_configure -- --enable-manuals

override_dh_shlibdeps:
dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info

override_dh_auto_test:
1 change: 1 addition & 0 deletions src/tacacs/bash/bash_tacplus/debian/source/format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0 (quilt)

0 comments on commit db26d95

Please sign in to comment.