Changeset 290734fd in freewrt


Ignore:
Timestamp:
Jan 7, 2007, 3:57:20 AM (19 years ago)
Author:
Thorsten Glaser <tg@…>
Children:
0f4060c
Parents:
c1918f0
Message:

*experimental* stuff to check

  • all IPKGs for a specific package
  • all files in the target root filesystem

for md5 collisions and report them, so they can be fixed.

enhancements:

  • check the entire contents of bin/packages/ too (cross-package checks) -> needs persistent cache file
  • ignore 0-byte-file MD5

git-svn-id: svn://www.freewrt.org/branches/common-adk@1502 afb5a338-a214-0410-bd46-81f09a774fd1

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • mk/package.mk

    rc1918f0 r290734fd  
    5353
    5454package:
     55        x='${ALL_IDIRS}'; [[ -z $$x ]] || \
     56            md5sum $$(find $$x -type f) | sort | \
     57            while read sum name; do \
     58                if [[ $$sum = $$ls ]]; then \
     59                        case $$x in \
     60                        1)      echo 'WARNING: duplicate files found in' \
     61                                    'package "${PKG_NAME}"! Fix them.' >&2; \
     62                                echo -n "> $$ln "; \
     63                                ;; \
     64                        2)      echo -n "> $$ln "; \
     65                                ;; \
     66                        3)      echo -n ' '; \
     67                                ;; \
     68                        esac; \
     69                        echo -n "$$name"; \
     70                        x=3; \
     71                else \
     72                        case $$x in \
     73                        3)      echo; \
     74                                x=2; \
     75                                ;; \
     76                        esac; \
     77                fi; \
     78                ls=$$sum; \
     79                ln=$$name; \
     80        done
     81
    5582        touch ${_IPKGS_COOKIE}
    5683
     
    5986ALL_IPKGS+=     $$(IPKG_$(1))
    6087IDIR_$(1)=      $(WRKDIR)/fake-${ARCH}/ipkg-$(2)
     88ALL_IDIRS+=     $${IDIR_$(1)}
    6189INFO_$(1)=      $(IPKG_STATE_DIR)/info/$(2).list
    6290
  • target/image/common.mk

    rc1918f0 r290734fd  
    2121            dd if=$$rng bs=512 count=1 >>${KDIR}/root/etc/.rnd; \
    2222            chmod 600 ${KDIR}/root/etc/.rnd
     23        cd ${KDIR}; ls=; ln=; x=1; md5sum $$(find root -type f) | sort | \
     24            while read sum name; do \
     25                if [[ $$sum = $$ls ]]; then \
     26                        case $$x in \
     27                        1)      echo 'WARNING: duplicate files found' \
     28                                    'in filesystem! Please fix them.' >&2; \
     29                                echo -n "> $$ln "; \
     30                                ;; \
     31                        2)      echo -n "> $$ln "; \
     32                                ;; \
     33                        3)      echo -n ' '; \
     34                                ;; \
     35                        esac; \
     36                        echo -n "$$name"; \
     37                        x=3; \
     38                else \
     39                        case $$x in \
     40                        3)      echo; \
     41                                x=2; \
     42                                ;; \
     43                        esac; \
     44                fi; \
     45                ls=$$sum; \
     46                ln=$$name; \
     47        done
Note: See TracChangeset for help on using the changeset viewer.